Barrier is a synchronization mechanism in Unified Parallel C (UPC), where UPC is a programming language derived from the C programming language. In UPC, when a thread encounters a barrier, the thread waits at the barrier until all other threads execute the same (or another) barrier statement. Since barriers are used extensively in UPC programs, the runtime performance associated with the execution of a barrier statement has a significant impact on the runtime performance of typical UPC programs.